/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package TMS;
import java.util.Random;
/**
 *
 * @author Zachary
 */
public class Heart_Monitor {
    private static Random randomizer = null;
    public static double get_heart_rate(){
        double hr = 0;
        if (randomizer == null){
            randomizer = new Random();
            randomizer.setSeed(System.currentTimeMillis());
        }
        for (int i = 0; i < 12; i ++) hr += randomizer.nextDouble();
        hr -= 6;
        hr = hr *.5 + 100;
        hr += (Treadmill.get_current_speed()/Treadmill.max_speed)* 80;
        hr += (Treadmill.get_current_incline()/Treadmill.max_incline)* 20;
        return hr;
    }
}
